package com.qiudaozhang.controller;

import com.qiudaozhang.dto.ResponseCode;
import com.qiudaozhang.service.DataDictionaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("data")
public class DataController {
    @Autowired
    private DataDictionaryService dataDictionaryService;
    @RequestMapping("to/list")
    public String toList(){
        return "data/list";
    }

    @RequestMapping("list")
    @ResponseBody
    public ResponseCode list(){
        ResponseCode code = dataDictionaryService.query();


        return code;
    }



}
